package com.ws.system.userrole.controller;


import com.ws.common.base.BaseUtils;
import com.ws.common.utils.SessionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ws.system.userrole.entity.SystemUserrole;
import org.springframework.web.bind.annotation.RestController;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ws.common.result.entity.ResultEntity;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.ws.system.userrole.service.ISystemUserroleService;
import com.ws.common.base.BaseController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author weifucheng
 * @since 2019-11-08
 */
@RestController
@RequestMapping("/system/userrole")
public class SystemUserroleController extends BaseController<SystemUserrole> {

    @Autowired
    private ISystemUserroleService systemUserroleService;

    @RequestMapping("/list")
    public ResultEntity list(SystemUserrole systemUserrole, Integer current, Integer size){
        return ResultEntity.succes(systemUserroleService.list(systemUserrole, current, size));
    }

    @RequestMapping("/updateById")
    public ResultEntity updateById(String roleId,String userId, Boolean checked){
        return ResultEntity.succes(systemUserroleService.updateById(roleId,checked,userId));
    }
}
